home *** CD-ROM | disk | FTP | other *** search
/ Georgia Wildfire Prevention / Georgia Wildfire Prevention.iso / mac / media / dirs / BackUp / code.cst / 00037_Script_blink < prev   
Text File  |  2002-10-15  |  1KB  |  58 lines

  1. property plain,blink1,blink2,state,flashstate,flashon,nextflash,blinkrate,mysprite,spritenum
  2. global ans,lastclicked,nome,godject
  3. on new me
  4.   mysprite=sprite(spritenum)
  5.   plain=mysprite.member.name
  6.   state=0
  7.   flashstate=0
  8.   flashon=0
  9.   nextflash=0
  10.   blinkrate=30
  11. end
  12.  
  13. on beginsprite me
  14.   if blink1="x" then blink1=plain
  15.   if blink2="x" then blink2=plain&"hot"
  16. end
  17.  
  18. on getpropertydescriptionlist me
  19.   set proplist=[#blink1:[#comment:"Name of blink image",#format:#string,#default:"x"],#blink2:[#comment:"Name of other image",#format:#string,#default:"x"]]
  20.   return proplist
  21. end
  22.  
  23. on flash me
  24.   if flashstate=0 then
  25.     mysprite.member=member(blink2)
  26.   else
  27.     mysprite.member=member(blink1)
  28.   end if
  29.   flashstate=not(flashstate)
  30. end
  31.  
  32. on blink_on me,br
  33.   if br.ilk=#integer then blinkrate=br
  34.   nextflash=the ticks+blinkrate
  35.   flashon=1
  36. end
  37.  
  38. on blink_off me
  39.   mysprite.member=member(blink1)
  40.   updatestage
  41.   flashon=0
  42. end
  43.  
  44. on exitframe me
  45.   if flashon then
  46.     if the ticks>nextflash then
  47.       flash(me)
  48.       nextflash=the ticks+blinkrate
  49.     end if
  50.   end if
  51. end
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.